package edu.hnu.userserver.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName client_salesperson
 */
@TableName(value ="client_salesperson")
@Data
public class ClientSalesperson implements Serializable {
    /**
     * 顾客的名字
     */
    @TableId(value = "client_name")
    private String clientName;

    /**
     * 销售员的名字
     */
    @TableField(value = "salesperson")
    private String salesperson;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ClientSalesperson other = (ClientSalesperson) that;
        return (this.getClientName() == null ? other.getClientName() == null : this.getClientName().equals(other.getClientName()))
            && (this.getSalesperson() == null ? other.getSalesperson() == null : this.getSalesperson().equals(other.getSalesperson()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getClientName() == null) ? 0 : getClientName().hashCode());
        result = prime * result + ((getSalesperson() == null) ? 0 : getSalesperson().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", clientName=").append(clientName);
        sb.append(", salesperson=").append(salesperson);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}